function getopenid(f) {
    var url = document.URL;
  //  alert(url);
    var start = url.indexOf("code=");
    var end = url.indexOf("&",start);
    var code = url.substring(start + 5, end);

   // alert(code);

    $.get("/find_openid", {code: code}, function (data) {
         //  alert(data);
        var openid = data;
        localStorage.openid = openid;
        f(openid);
    });
}
